<template>
	<layout>
  <!--韶华追忆-->
  <div class="warp">
    <div class="main_l">
      <div class="news_works">
        <!-- 返回首页 -->
        <backIndex :title="title"/>
        <div>
          <p class="title">{{detail.title}}</p>
          <div class="time">
            <span>时间：{{(detail.create_time)}}</span>
          </div>
          <!-- 内容 -->
          <div v-html="detail.content">

          </div>
        </div>
      </div>
    </div>
    <!-- 主要右边 -->
    <mainR />
  </div>
	</layout>
</template>

<script>
import layout from '@/layout/index.vue'	
import backIndex from "@/components/backIndex";
import mainR from "@/components/mainR";
export default {
  components: {layout, mainR , backIndex },
  data() {
    return {
			id:'',
			table:'',
      title:'',
      detail:{
        title:'',
        content:'',
        create_time:''
      }
      
    };
  },
	onLoad(options){
		console.log(options)
		if(options){
			this.id = options.id
			this.table = options.table
			this.title = options.title
			this.getdDetail()
		}
	},
  computed: {},
  methods: {
    // 详情
     getdDetail(){
      const data={
				id:this.id,
				table:this.table,
			}
			console.log(('data',data))
      this.$Ajax('getDetail',data,res=>{
      	console.log(res.data)
      	 this.detail = res.data
      })
    },
  }
};
</script>
<style scoped>
.title{
  text-align: center;
  font-size: 16px;
  margin: 10px;
}
.time{
  text-align: right;
  color: #999;
  font-size: 12px;
}
</style>
